/**
 * 
 */
package jdbcEx.examples.util;

import java.sql.Connection;
import java.sql.DriverManager;

/**
 * @author Dhruva
 * 
 */
public class ConectionManager {

	private static ConectionManager instance = null;
	private Connection connection;

	private ConectionManager() {

	}

	public static ConectionManager getInstance() {

		if (null == instance) {
			instance = new ConectionManager();
		}

		return instance;
	}

	public Connection getConnection() {
		try {
			Class.forName("com.mysql.jdbc.Driver");

			connection = DriverManager.getConnection(
					"jdbc:mysql://localhost:3306/explorecalifornia", "root",
					"root");
		} catch (Exception exception) {

		}
		return connection;

	}

}
